package com.easepal.socketiolib.model;

/**
 * 作者: bright.lin@medisana.net.cn
 * 时间: 2018/12/12
 * 标题: 数据包基础类
 * 描述: 云端推送的数据包的基础数据结构
 * 修改: 由 bright.lin@medisana.net.cn 修改于 2018/12/12
 */
public class BaseModel {

    // 数据
    private SocketModel data;
    // 事件类型
    private int eventType;
    // 序列号
    private String sn;
    // 发布消息key
    private String publishKey;
    // 时间戳
    private String timestamp;

    /**
     * 无参构造器
     */
    public BaseModel() {
    }

    /**
     * 带参构造器
     * @param data 数据
     * @param eventType 事件类型
     * @param sn 序列号
     * @param publishKey 发布消息key
     * @param timestamp 时间戳
     */
    public BaseModel(SocketModel data, int eventType, String sn, String publishKey, String timestamp) {
        this.data = data;
        this.eventType = eventType;
        this.sn = sn;
        this.publishKey = publishKey;
        this.timestamp = timestamp;
    }

    /*变量getter、setter*/
    public SocketModel getData() {
        return data;
    }

    public void setData(SocketModel data) {
        this.data = data;
    }

    public int getEventType() {
        return eventType;
    }

    public void setEventType(int eventType) {
        this.eventType = eventType;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getPublishKey() {
        return publishKey;
    }

    public void setPublishKey(String publishKey) {
        this.publishKey = publishKey;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }
    /*变量getter、setter*/
}
